1 % Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite
3 {\ttfamily \raggedright {
5 \mbox{}\textbf{\textcolor{RoyalBlue
}{\#include
}}\
\texttt{\textcolor{Red
}{$<$iostream$>$
}} \\
6 \mbox{}\textbf{\textcolor{RoyalBlue
}{\#include
}}\
\texttt{\textcolor{Red
}{$<$fstream$>$
}} \\
8 \mbox{}\textbf{\textcolor{Blue
}{using
}}\
\textbf{\textcolor{Blue
}{namespace
}}\ std
\textcolor{BrickRed
}{;
} \\
10 \mbox{}\textcolor{ForestGreen
}{int
}\
\textbf{\textcolor{Black
}{$
\_$main
}}\textcolor{BrickRed
}{()
}\textcolor{Red
}{\
{} \\
11 \mbox{}\ \
\textbf{\textcolor{Black
}{freopen
}}\textcolor{BrickRed
}{(
}\texttt{\textcolor{Red
}{"
{}entrada.in"
{}}}\textcolor{BrickRed
}{,
}\
\texttt{\textcolor{Red
}{"
{}r"
{}}}\textcolor{BrickRed
}{,
}\ stdin
\textcolor{BrickRed
}{);
} \\
12 \mbox{}\ \
\textbf{\textcolor{Black
}{freopen
}}\textcolor{BrickRed
}{(
}\texttt{\textcolor{Red
}{"
{}entrada.out"
{}}}\textcolor{BrickRed
}{,
}\
\texttt{\textcolor{Red
}{"
{}w"
{}}}\textcolor{BrickRed
}{,
}\ stdout
\textcolor{BrickRed
}{);
} \\
14 \mbox{}\ \ string\ s
\textcolor{BrickRed
}{;
} \\
15 \mbox{}\ \
\textbf{\textcolor{Blue
}{while
}}\
\textcolor{BrickRed
}{(
}cin\
\textcolor{BrickRed
}{$>$$>$
}\ s
\textcolor{BrickRed
}{)
}\textcolor{Red
}{\
{} \\
16 \mbox{}\ \ \ \ cout\
\textcolor{BrickRed
}{$<$$<$
}\
\texttt{\textcolor{Red
}{"
{}Leí\ "
{}}}\
\textcolor{BrickRed
}{$<$$<$
}\ s\
\textcolor{BrickRed
}{$<$$<$
}\ endl
\textcolor{BrickRed
}{;
} \\
17 \mbox{}\ \
\textcolor{Red
}{\
}} \\
18 \mbox{}\ \
\textbf{\textcolor{Blue
}{return
}}\
\textcolor{Purple
}{0}\textcolor{BrickRed
}{;
} \\
19 \mbox{}\textcolor{Red
}{\
}} \\
22 \mbox{}\textcolor{ForestGreen
}{int
}\
\textbf{\textcolor{Black
}{main
}}\textcolor{BrickRed
}{()
}\textcolor{Red
}{\
{} \\
23 \mbox{}\ \ ifstream\
\textbf{\textcolor{Black
}{fin
}}\textcolor{BrickRed
}{(
}\texttt{\textcolor{Red
}{"
{}entrada.in"
{}}}\textcolor{BrickRed
}{);
} \\
24 \mbox{}\ \ ofstream\
\textbf{\textcolor{Black
}{fout
}}\textcolor{BrickRed
}{(
}\texttt{\textcolor{Red
}{"
{}entrada.out"
{}}}\textcolor{BrickRed
}{);
} \\
26 \mbox{}\ \ string\ s
\textcolor{BrickRed
}{;
} \\
27 \mbox{}\ \
\textbf{\textcolor{Blue
}{while
}}\
\textcolor{BrickRed
}{(
}fin\
\textcolor{BrickRed
}{$>$$>$
}\ s
\textcolor{BrickRed
}{)
}\textcolor{Red
}{\
{} \\
28 \mbox{}\ \ \ \ fout\
\textcolor{BrickRed
}{$<$$<$
}\
\texttt{\textcolor{Red
}{"
{}Leí\ "
{}}}\
\textcolor{BrickRed
}{$<$$<$
}\ s\
\textcolor{BrickRed
}{$<$$<$
}\ endl
\textcolor{BrickRed
}{;
} \\
29 \mbox{}\ \
\textcolor{Red
}{\
}} \\
30 \mbox{}\ \
\textbf{\textcolor{Blue
}{return
}}\
\textcolor{Purple
}{0}\textcolor{BrickRed
}{;
} \\
31 \mbox{}\textcolor{Red
}{\
}} \\
33 } \normalfont\normalsize